//
//  ProtocolViewController.m
//  cm
//
//  Created by suyibaishan on 2017/11/7.
//  Copyright © 2017年 feihu. All rights reserved.
//

#import "ProtocolViewController.h"

@interface ProtocolViewController ()
{
    UIScrollView *_scrollView;
}
@end

@implementation ProtocolViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    
    [self createProtocolView];
}

-(void)createProtocolView
{
    self.titleLabel.text = @"服务协议";
    self.backButton.hidden = NO;
    
    _scrollView = [[UIScrollView alloc] initWithFrame:CGRectMake(0, self.baseBarHeight, kScreenWidth, kScreenHeight - self.baseBarHeight)];
    _scrollView.backgroundColor = [UIColor colorWithRed:0.96 green:0.96 blue:0.96 alpha:1];
    _scrollView.showsVerticalScrollIndicator = NO;
    [self.view addSubview:_scrollView];
    
    UIImageView *protocolImg = [[UIImageView alloc] initWithFrame:CGRectMake(0, 0, kScreenWidth, 5050)];
    protocolImg.image = [UIImage imageNamed:@"cm_protocol"];
    [_scrollView addSubview:protocolImg];
    
    [_scrollView setupAutoContentSizeWithBottomView:protocolImg bottomMargin:10];
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
